package sc.prototype.pfs.eventnotify.model.enums;

public enum NotifyAPIType {

    /** HTTP POST */
    HTTP("HTTP", "HTTP通知"),

    /** 统一MQ */
    UniMQ("UniMQ", "统一MQ通知");

    private final String code;

    private final String message;

    NotifyAPIType(String code, String message) {
        this.code = code;
        this.message = message;
    }

    public static NotifyAPIType getByCode(String code) {
        for (NotifyAPIType resultCode : NotifyAPIType.values()) {
            if (resultCode.getCode().equals(code)) {
                return resultCode;
            }
        }
        return null;
    }

    public String getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }
}
